const MongoClient = require('mongodb').MongoClient;
const url = 'mongodb://localhost:27017'; // MongoDB 连接 URL
MongoClient.connect(url, function(err, client) {
    if (err) {
      console.error('Failed to connect to MongoDB:', err);
      return;
    }
    
    console.log('Connected to MongoDB successfully!');
    
    // 在这里进行数据库操作
  });

